<?php


namespace app\common\model;

class CardType
{
	const Time = [0, "会员"];
	const Point = [1, "积分"];
	const RegisterCode = [2, "注册码"];
	public static function ClearCache()
	{
		$objClass = new \ReflectionClass("app\\common\\model\\CardType");
		$arrConst = $objClass->getConstants();
		return $arrConst;
		$consts = $arrConst;
		foreach ($consts as $k => $v) {
			print_r($v);
		}
	}
	public static function getName($id)
	{
		foreach (self::ClearCache() as $k => $v) {
			if ($id == $v[0]) {
				return $v[1];
			}
		}
		return null;
	}
}